<?php
/**
 * This is Lil's core configuration file.
 *
 * Don not modify this file directly. Override or set your configuration directives in 
 * APP/config/config.php.
 *
 * @copyright     Copyright 2008-2010, LilCake.net
 * @link          http://lilcake.net LilCake.net
 * @package       lil
 * @subpackage    lil.config
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
	Configure::write('Lil.useAdminLayout', true);
	
	Configure::write('Lil.authModel', 'User');
	Configure::write('Lil.authSessionKey', 'Auth.User');
	Configure::write('Lil.authFields', array('username' => 'username', 'password' => 'passwd'));
	
	Configure::write('Lil.languages', array('eng'));

	Configure::write('Lil.tablePrefix', '');
	
	Configure::write('Lil.userAssociation', array(
		'className'             => 'Lil.User',
		'foreignKey'            => 'user_id',
		'associationForeignKey' => 'area_id',
	));

	Configure::write('Lil.userDisplayField', 'name');
	Configure::write('Lil.userAdminField',   'admin');
	Configure::write('Lil.userEmailField',   null);
	
	Configure::write('Lil.areaSlug', 'auto'); // auto, manual
	
	Configure::write('Lil.areaSlugField',        'slug');
	Configure::write('Lil.areaDisplayField',     'name');
	Configure::write('Lil.areaDescriptionField', 'descript');
	
	Configure::write('Lil.areasTable',       'areas');
	Configure::write('Lil.usersTable',       'users');
	Configure::write('Lil.areasUsersTable',  'areas_users');
	
	// ability to disable areas table
	Configure::write('Lil.noAreas', false);
	
	// ability select default area when no area is selected
	Configure::write('Lil.defaultArea', false);
	
	Configure::write('Lil.from.email', 'info@example.com');
	Configure::write('Lil.from.name', 'Lil');
	
	Cache::config('Lil', array(
		'engine' => 'File',
		'prefix' => '',
		'path' => CACHE . 'lil' . DS,
		'serialize' => true,
		'duration' => '+30 days'
	));
	
	Configure::write('LilFloat.thousandsSeparator', ',');
	Configure::write('LilFloat.decimalSeparator', '.');
	Configure::write('LilFloat.currencySymbol', '$');
	
	// initialize plugin variable
	if (!$plugins = Configure::read('Lil.plugins')) Configure::write('Lil.plugins', array());

	App::build(array(
	    'View' => array(dirname(dirname(__FILE__)) . DS . 'View' . DS),
	));